from django.db import models
# from pygments.lexers import get_lexer_by_name
# from pygments.formatter.html import HtmlFormatter
# from pygments import highlight

# Create your models here.
class Product(models.Model):
    sku = models.CharField(max_length=30)
    name = models.CharField(max_length=30)
    category_id = models.IntegerField(default=0)
    # owner = models.ForeignKey('auth.User', related_name='product', on_delete=models.CASCADE)
    # highlighted = models.TextField()


    # def save(self, *args, **kwargs):
    #     lexer = get_lexer_by_name(self.language)
    #     linenos = 'table' if self.linenos else False
    #     options = {'title': self.title} if self.title else {}
    #     formatter = HtmlFormatter(style=self.style, linenos=linenos,
    #                               full=True, **options)
    #     self.highlighted = highlight(self.code, lexer, formatter)
    #     super(Product, self).save(*args, **kwargs)





